#include <iostream>
#include <string>
#include <cmath>
using namespace std;
using ull = unsigned long long;

const int N = 1e5 + 3;
char c[N];
ull h[N], p[N];

int main()
{
    int n, m; cin >> n >> m >> c + 1;

    p[0] = 1;
    for(int i = 1, cur = 0; i <= n; ++i)
    {
        p[i] = p[i - 1] * 131;
        h[i] = h[i - 1] * 131 + c[i];
    }
    
    while(m--)
    {
        int l1, r1, l2, r2; cin >> l1 >> r1 >> l2 >> r2;
        ull h_1 = h[r1] - h[l1 - 1] * p[r1 - l1 + 1];
        ull h_2 = h[r2] - h[l2 - 1] * p[r2 - l2 + 1];
        if(h_1 == h_2) cout << "Yes\n";
        else cout << "No\n";
    }
    return 0;
}